<div class="primary">
    <div class="main-content">
    <?php
    if($keyword != '') {
        ?>
        <div class="main-content-left">
            <div class="breadcrumb">
            	<span itemtype="http://data-vocabulary.org/Breadcrumb" itemscope="itemscope" class="crumb_item">
            		<a itemprop="url" rel="up" class="crumb" href="<?=DOMAIN?>/"><span itemprop="title">Trang chủ</span></a>
            		<span class="arrow"><img src="<?=$path_images_page?>navRow.png" alt="bredcrumb arrow"/></span>
            	</span>
            	<span itemtype="http://data-vocabulary.org/Breadcrumb" itemscope="itemscope" class="crumb_item">
            		<a itemprop="url" rel="up" class="crumb" href="/tags/"><span itemprop="title">Tags</span></a>
            		<span class="arrow"><img src="<?=$path_images_page?>navRow.png" alt="bredcrumb arrow"/></span>
            	</span>
                <span itemtype="http://data-vocabulary.org/Breadcrumb" itemscope="itemscope" class="crumb_item">
            		<a itemprop="url" rel="up" class="crumb" href="<?=$_SERVER['REQUEST_URI']?>"><span itemprop="title"><?=$keyword?></span></a>
            	</span>
                <span class="breadcrumb_date"><?=getDateTime('','1','1','0','',time())?></span>
            </div>
            <h1 class="tags_title">Tags : <?=$keyword?></h1>
            <h3 class="tags_description">Các tin liên quan đến từ khóa: <b><?=$keyword?></b></h3>
            <?php
            foreach($list_news_tags as $news) {
                ?>
                
                <div class="cat-news-box">
                    <div class="cat-new-box-left">
                        <div class="img">
                            <a href="<?=generate_detail_url($news,$news['cat_name'])?>"><img alt="<?=$news['new_title']?>" src="<?=$news['new_picture']?>" /></a>
                        </div>
                        <div class="cont">
                            <a href="<?=generate_detail_url($news,$news['cat_name'])?>"><h2><?=str_replace($keyword,'<span class="tags_hightlight">'.$keyword.'</span>',$news['new_title'])?></h2></a>
                            <p class="time">Cập nhật vào <?=getDateTime('','1','1','1','',$news['new_date'])?></p>
                            <p><?=$news['new_teaser'] != '' ? str_replace($keyword,'<span class="tags_hightlight">'.$keyword.'</span>',cut_string(removeHTML($news['new_teaser']),300)) : str_replace($keyword,'<span class="tags_hightlight">'.$keyword.'</span>',cut_string(removeHTML($news['new_detail']),300))?></p>
                            <div class="post_tags">
                            <?php
                            $arr_tags_item = explode(',',$news['new_tags']);
                            $tags_item_total= count($arr_tags_item) - 1;
                            for($i = 0; $i < $tags_item_total; $i++) {
                                $tags_link = str_replace(' ','+', $arr_tags_item[$i]);
                                ?><a href="<?=DOMAIN.'/tags/'.$tags_link?>" rel="tag"><?=$arr_tags_item[$i] == $keyword?'<span class="tags_hightlight">'.$arr_tags_item[$i].'</span>' : "$arr_tags_item[$i]"?></a><?=$i != ($tags_item_total-1) ? ', ' : ''?><?
                            }
                            ?>
                            </div>
                        </div>
                    </div><!-- End cat-news-tags-box -->
                </div>
                <?
            }
            ?>
        </div><!-- End main-content-left -->
        <?
    }else {
        ?>
        <div class="main-content-left">
            <div class="breadcrumb">
            	<span itemtype="http://data-vocabulary.org/Breadcrumb" itemscope="itemscope" class="crumb_item">
            		<a itemprop="url" rel="up" class="crumb" href="<?=DOMAIN?>/"><span itemprop="title">Trang chủ</span></a>
            		<span class="arrow"><span>&gt;</span></span>
            	</span>
            </div>
            <h1 class="tags_title">Tags - VnUpdate.net tin tức cập nhật</h1>
            <h3 class="tags_description">Các tags(từ khóa) thường xuyên được sử dụng</h3>
            <div class="all_tags">
            <?php
            foreach($arr_tags_all as $tags_key=>$tags_level) {
                $tag_key_link = str_replace(' ','+',$tags_key);
                switch($tags_level) {
                    case 4 :
                    case 5 :
                        $style = 'style="font-size: 13px;"';
                        break;
                    case 6 :
                    case 7 :
                    case 8 :
                    case 9 :
                        $style = 'style="font-size: 14px;"';
                        break;
                    case 10 :
                    case 11 :
                    case 12 :
                    case 13 :
                    case 14 :
                        $style = 'style="font-size: 16px;"';
                        break;
                    case 15 :
                    case 16 :
                    case 17 :
                    case 18 :
                    case 19 :
                        $style = 'style="font-size: 18px;"';
                        break;
                    default :
                        $style = 'style="font-size: 22px;"';
                        break;
                }
                ?>
                <a href="<?='/tags/'.$tag_key_link?>" <?=$style?>><?=$tags_key?></a>
                <?
            }
            ?>
            </div>
        </div><!-- End main-content-left -->
        <?
    }
    ?>
        
        <div class="main-content-right">
            <img alt="quang cao" src="../themes/img/adv2.jpg" />
        </div><!-- End main-content-right -->
    </div><!-- End main-content -->
</div><!-- End primary -->
<script>
    $(document).ready(function () { 
        $(window).scroll(function(){
            var scrollPos = $(window).scrollTop();
            if ( scrollPos > 95){
                $('.fix_menu_active').css({'height':'35px','width':'1010px','margin': '0 auto'})
                $('.fix_menu').css({'position':'fixed','width':'100%','height':'35px','left':'0px','top':'0px'});
                $('.navigation').css({'position':'fixed','margin':'0 auto','left':'50%','margin-left':'-505px','top':'0px'});
                
            }else{
                $('.fix_menu_active').removeAttr('style');
                $('.fix_menu').removeAttr('style');
                $('.navigation').removeAttr('style');
            }
        });  
    });
</script>